
import { Button } from "@/components/base";
import { useNavigate } from "react-router-dom";
import * as apis from "@/apis";


/** 查看 */
export const View = (props: {
    record: any,
    index: number
}) => {

    const { record } = props;
    const navigate = useNavigate();

    if (record.orderStatus === apis.order.OrderStatus.待下单) return <></>
    return (
        <>
            <Button type='link' onClick={() => { navigate(`../details?id=${record.id}`) }} >查看</Button>
        </>
    )
}

